#ifndef _SYS_SLOT_H_
#define _SYS_SLOT_H_

#include "FanObj.h"
#include "SysTypes.h"

#define SLOT_VTABLE(self)   ((SlotVTable*)((FanObj*)self)->vtable)


extern Type*    Slot_classType;
extern VTable*  Slot_classVTable;


/* [sys::Slot] Attributes */
struct Slot
{
  FanObj        super;
};


/* [sys::Slot] Virtual-table */
typedef struct SlotVTable
{
  FanObjVTable  super;
  Str*          (*signature)(Slot* self);
} SlotVTable;


/* [sys::Slot] Methods and fields */
Str*            Slot_toStr(Obj self);
Slot*           Slot_find_1(Str* qname);
Slot*           Slot_find(Str* qname, Bool checked);
Method*         Slot_findMethod_1(Str* qname);
Method*         Slot_findMethod(Str* qname, Bool checked);
Field*          Slot_findField_1(Str* qname);
Field*          Slot_findField(Str* qname, Bool checked);
Func*           Slot_findFunc_1(Str* qname);
Func*           Slot_findFunc(Str* qname, Bool checked);
Type*           Slot_parent(Slot* self);
Str*            Slot_name(Slot* self);
Str*            Slot_qname(Slot* self);
Bool            Slot_isField(Slot* self);
Bool            Slot_isMethod(Slot* self);
Bool            Slot_isAbstract(Slot* self);
Bool            Slot_isConst(Slot* self);
Bool            Slot_isCtor(Slot* self);
Bool            Slot_isInternal(Slot* self);
Bool            Slot_isNative(Slot* self);
Bool            Slot_isOverride(Slot* self);
Bool            Slot_isPrivate(Slot* self);
Bool            Slot_isProtected(Slot* self);
Bool            Slot_isPublic(Slot* self);
Bool            Slot_isStatic(Slot* self);
Bool            Slot_isSynthetic(Slot* self);
Bool            Slot_isVirtual(Slot* self);
List*           Slot_facets(Slot* self);
Facet*          Slot_facet_1(Slot* self, Type* type);
Facet*          Slot_facet(Slot* self, Type* type, Bool checked);
Bool            Slot_hasFacet(Slot* self, Type* type);
Str*            Slot_doc(Slot* self);
Str*            Slot_signature(Slot* self);


/* [sys::Slot] Type-system functions */
Type*           Slot_initType(void);
VTable*         Slot_initVTable(void);
void            Slot_initStatic(void);


#endif
